#ifndef PROSTARTUP_NEWPRO_H
#define PROSTARTUP_NEWPRO_H

#include <QDialog>
#include <QFileDialog>

struct Project_Path  // 工程路径结构体
{
    QString proName;
    QString proFilePath;


};

#ifndef PROJECT_STARTUP_INTERFACE_H
#include "project_startup_interface.h"
#endif

#define PROJECT_FILE_END_FORMAT ".pro"

namespace Ui {
class proStartup_newPro;
}

class proStartup_newPro : public QDialog
{
    Q_OBJECT

public:
    explicit proStartup_newPro(QWidget *parent = nullptr);
    ~proStartup_newPro();

    void set_proNewFilePath(QString path);
    void set_rootTreeItem(QTreeWidgetItem *root);

signals:
    void sendProjectPath(Project_Path);

private slots:
    void on_pushButton_cansel_clicked();

    void on_pushButton_finish_clicked();

    void on_lineEdit_proName_textChanged(const QString &arg1);

    void on_toolButton_clicked();

private:
    Ui::proStartup_newPro *ui;

    QString proFilePath;
    QString proTree;
    QTreeWidgetItem *root = nullptr;
    ProStoreFolderPath proStoreFolderpath;

    QString getProjectPath(QString path)
    {
        QStringList l = path.split("/");
        l.removeLast();
        return l.join("/") + "/";
    }
};

#endif // PROSTARTUP_NEWPRO_H
